<html>
<head><meta charset="utf-8"><title>unexpected() · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/unexpected().html">unexpected()</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="200833619"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/unexpected%28%29/near/200833619" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/unexpected().html#200833619">(Jun 14 2020 at 21:06)</a>:</h4>
<p>Is there a reason that <code>Parser::unexpected()</code> is crate-private, rather than public? The equivalent, <code>expect_one_of(&amp;[], &amp;[])</code>, is public.</p>



<a name="200833639"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/unexpected%28%29/near/200833639" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/unexpected().html#200833639">(Jun 14 2020 at 21:07)</a>:</h4>
<p>I wanted to simplify some parsing code so that it'd be easier to add another case to it, and in the process, I wanted to change a series of <code>eat</code>, <code>eat</code>, ..., <code>expect</code> into <code>eat</code>, <code>eat</code>, ..., <code>eat</code>, <code>unexpected</code>.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>